from paddlenlp.transformers import UIE, AutoTokenizer

# 指定目标文件夹
target_folder = r"D:\uie_base"  # 替换为你希望保存模型的路径

# 下载模型和分词器到指定文件夹
model = UIE.from_pretrained("uie-base", cache_dir=target_folder)
tokenizer = AutoTokenizer.from_pretrained("uie-base", cache_dir=target_folder)

print(f"模型已下载到: {target_folder}")